package cn.xopencode.userservice.enums;

import cn.xopencode.common.framework.core.IntArrayValuable;

import java.util.Arrays;

/**
 * 是否删除
 *
 * @Author xiaodawei
 * @since 2021/9/18
 */
public enum DeletedEnum implements IntArrayValuable {

    DELETED0(1, "未删除"),
    DELETED1(2, "已删除");
    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeletedEnum::getIsDeleted).toArray();


    /**
     * 是否删除
     */
    private final Integer isDeleted;
    /**
     * 描述
     */
    private final String name;

    DeletedEnum(Integer isDeleted, String name) {
        this.isDeleted = isDeleted;
        this.name = name;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public String getName() {
        return name;
    }

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
